﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shop.Model.Entity.Use
{
    ///<summary>
    ///用户
    ///</summary>
    [SugarTable("use_user")]
    public partial class UseUser
    {
        public UseUser()
        {
        }
        /// <summary>
        /// 主键
        /// </summary>           
        [SugarColumn(IsPrimaryKey = true)]
        public long Id { get; set; }

        /// <summary>
        /// 用户Code
        /// </summary>     
        [SugarColumn(IsIdentity = true)]
        public int Code { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        public string Nickname { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        public string Head { get; set; }

        /// <summary>
        /// 性别（性别 0：未知、1：男、2：女）
        /// </summary>
        public int Sex { get; set; }

        /// <summary>
        /// 电话号码
        /// </summary>
        public string Tele { get; set; }

        /// <summary>
        /// 登录密码
        /// </summary>
        public string PassWord { get; set; }

        /// <summary>
        /// 交易密码
        /// </summary>
        public string WithdrawalPassword { get; set; }  

        /// <summary>
        /// 小程序OpenID
        /// </summary>
        public string AppletOpenId { get; set; }

        /// <summary>
        /// 公众号OpenID
        /// </summary>
        public string GongZongHaoOpenId { get; set; }

        /// <summary>
        /// 开发平台UnionID
        /// </summary>
        public string UnionId { get; set; }

        /// <summary>
        /// 上级Id
        /// </summary>
        public long SuperiorUser { get; set; }

        /// <summary>
        /// 状态 
        /// -1：注销账号
        /// 0：正常 
        /// 1：冻结提现 
        /// 2：冻结账户
        /// </summary>
        public int State { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        public DateTime CreatTime { get; set; }

        /// <summary>
        /// 等级
        /// 0：无级别
        /// 1：VIP1
        /// 2：VIP2
        /// 3：VIP3
        /// </summary>
        public int Grade { get; set; }

        /// <summary>
        /// 自购数量
        /// </summary>
        public int BuyCount { get; set; }

        /// <summary>
        /// 是否是董事
        /// </summary>
        // public bool Director { get; set; }

        /// <summary>
        /// 是否是服务中心
        /// </summary>
        // public bool Centre { get; set; }    

        /// <summary>
        /// 单量
        /// </summary>
        public int Points { get; set; }

        /// <summary>
        /// 行家审核
        /// 0：未达到
        /// 1：待申请/已驳回
        /// 2：审批中
        /// 3：已通过
        /// </summary>
        public int Audit { get; set; } = 0;
    }
}
